<div class="menu-wrapper">
        <div :style="indent">
            <div class="menu-item" v-if="itemData.nodes==null" :index="itemData.index">
                <i v-if="selectmodal==='single'" class="icon-file-text2"></i>
                <input v-else-if="selectmodal==='multi'" type='checkbox'></input>
                <span class="menu-text" @click="menuitemclick(itemData)">{{itemData.text}}</span>
            </div>

            <div class="submenu" v-if="itemData.nodes!=null" :index="itemData.index">
                <i v-if="!showchild" class="icon-folder" @click="togglechild"></i>
                <i v-else="showchild" class="icon-folder-open" @click="togglechild"></i>
                <span class="menu-text">{{itemData.text}}</span>
                <!--调用组件自身，循环item的nodes，实现递归 -->
                <child v-for="item in itemData.nodes" v-if="showchild" :item-data="item" :depth="depth+1" :selectmodal="selectmodal" @menuitemclick="menuitemclick"></child>
            </div>
        </div>
    </div>